﻿window.$jscript.fn.helperShare = (function () {
    var __FN = function () {
        return new __FN.fn._init();
    };
    var hxt = window.$jscript.fn;
    __FN.fn = __FN.prototype = {
        _init: function () { return this; },
        param: { msg: '', link: ''},
        ready: function (options) {
            var self = this;
            $.each(options, function (idx, item) {
                if (self.param.hasOwnProperty(idx)) {
                    self.param[idx] = item;
                }
            });
            hxt.config.link = self.param.link;
            self.initPage();
        },
        initPage: function () {
            var self = this;          
            hxt.element.elVue = new Vue({
                data: function () {
                    var _this = this;
                    return {
                        msgInfo: JSON.parse(hxt.fromBase64(self.param.msg)) || {}
                    };
                },
                
                computed: {
                    
                },
                mounted: function () {
                    var _this = this;
                    //console.log(_this.msgInfo);
                    //console.log(hxt.config.link);
                    //console.log(hxt.getComponent);
                },
                methods: {
                    
                },
                components: {
                    jsMediaDetail: function () { return hxt.getComponent({ url: hxt.config.link + 'pc/vueComponent', name: 'My/Component/pc.media.detail' }); }
                }
            }).$mount('#app');
        }
    };
    __FN.fn._init.prototype = __FN.fn;
    return __FN.fn;
})();